<?php

/**
 * pruebas actions.
 *
 * @package    auip
 * @subpackage pruebas
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class pruebasActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
    //$this->forward('default', 'module');
//   $this->forwardUnless($query = $request->getParameter('query'), 'job', 'search'); 
//   $this->jobs = Doctrine_Core::getTable('Universidad')->getForLuceneQuery($query);
//   if ($request->isXmlHttpRequest())
//    {
//        if ('*' == $query || !$this->jobs)
//        {
//            return $this->renderText('No results.');
//        } 
//        return $this->renderPartial('pruebas/list', array('jobs' => $this->jobs));
//    }   
  }
 public function executeSearch(sfWebRequest $request)
 {
   $this->forwardUnless($query = $request->getParameter('query'), 'pruebas', 'index'); 
   $this->jobs = Doctrine_Core::getTable('Universidad')->getForLuceneQuery($query);
   if ($request->isXmlHttpRequest())
    {
        if ('*' == $query || !$this->jobs)
        {
            return $this->renderText('No results.');
        } 
        return $this->renderPartial('pruebas/list', array('jobs' => $this->jobs));
    }
 }
}
